#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:homework3_5.py
# author:wmf
# datetime:2021/4/5 23:20
# software: PyCharm
'''
this is function description
'''
# import module your need

#5 文件编程小项目

import os
path = os.getcwd()

os.path.join(path,'Blowing in the wind.txt')

with open('Blowing in the wind.txt','r') as f:
    list1 = f.readlines()
    list1.insert(0,"Blowin' in the wind\n")
    list1.insert(1,"Bob Dylan\n")
    list1[len(list1)-1] = list1[len(list1)-1] + '\n'
    list1.insert(len(list1),"1962 by Warner Bros.Inc.")
with open('Blowing in the wind.txt','w') as f:
    for x in list1:
        f.write(x)
        print(x,end='')